package br.com.honorato.util.dao;

import java.util.Arrays;
import java.util.List;

public enum ETypeCompare
{
	EQUAL("="), BIGGER(">"), BIGGER_EQUAL(">="), MINOR("<"), MINOR_EQUAL("<="), DIFFERENT("<>");

	private final String code;

	private ETypeCompare(String code)
	{
		this.code = code;
	}

	public String getCode()
	{
		return this.code;
	}

	public static List<ETypeCompare> getListValues()
	{
		return Arrays.asList(ETypeCompare.values());
	}

	public static ETypeCompare getEModuleType(String code)
	{
		for (ETypeCompare eModuleType : getListValues())
		{
			if (eModuleType.getCode().equalsIgnoreCase(code))
			{
				return eModuleType;
			}
		}
		return null;
	}
}